A memory unit can be used to implement a number of storage related devices such as a random access memory (RAM), a first-in-first-out (FIFO) queue (e.g., by appropriately controlling the address values of the memory unit such that a FIFO queue is emulated with the memory unit), a content addressable memory (CAM), a shift register, etc. Some memory units as being offered to designers to implement their circuit designs, however, may not have a reset function. A reset function effectively “clears” a value of the memory unit's cell to some “reset” value (e.g., “0”, or other predetermined values).
Several approaches have been proposed to allow a reset function to be realized using a non-resettable memory unit. In one approach, the non-resettable memory unit can operate together with flip flops for indicating whether values of corresponding cells should be reset or not. If a flip flop indicates a value of a cell should be reset, a predetermined reset value can be output, instead of outputting a value stored in the non-resettable memory unit.
However, the conventional approach of realizing a reset function using the non-resettable memory unit suffers from a few drawbacks. In one aspect, the conventional approach suffers from a lack of flexibility in changing the reset value. For example, the reset value is fixed to a predetermined constant value and prevents different reset values to be assigned to a same cell at different time periods. Changing the reset values in the conventional approach may be performed by redesigning or recompiling the circuit designs, which may involve time consuming and inconvenient processes.